class Tools
{
	public static final String[] alphabet = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J"};

	public static int[] convertStringCoordsToInt(String coord)
	{

		String[] coordsArray = coord.split("");
		
		int[] coords = new int[2];

		coords[0] = getIndexOfValueInStringArray(coordsArray[0], alphabet);
		coords[1] = new Integer(coordsArray[1]);
		
		return coords;
	}
	
	public static String convertIntCoordsToString(int coordX, int coordY)
	{
		return(alphabet[coordX] + "" + coordY);
	}
	
	public static int getIndexOfValueInStringArray(String value, String[] array)
	{
		int index = -1;

		for (int i = 0; i < array.length; i++) 
		{
			if (value.equals(array[i])) 
			{
				index = i;
				break;
			}
		}

		return index;
	}
}